﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Rectangle rt = new Rectangle(4, 5);
            //输出矩形面积
            textBox1.Text=rt.GetArea().ToString();
            rt.Width = 8;
            rt.Height = 6;
            textBox2.Text = rt.GetArea().ToString();


        }
    }
}
